<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDetailTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
         Schema::create('detail', function (Blueprint $table) {
            $table->increments('did')->comment('详情ID');
            $table->string('oid')->nullable()->comment('订单号');
            $table->unsignedInteger('gid')->default(0)->comment('商品ID');
            $table->string('buyprice')->nullable()->comment('订单总价');
            $table->string('buycnt')->nullable()->comment('订单件数');
            
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::drop('detail');
    }
}
